<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>${requestScope.PageTitle}</title>
		<style type="text/css">
			.FieldErrorMsg {
				color: red;
			}
		</style>
	</head>
	<body>
		<%@ include file="HeaderAdmin.jsp" %>
		<center>
			<form action="EmployeeDetail${requestScope.ActionTargetTail}" method="post">
				<table border='0' cellpadding='5' cellspacing='5'>
					<tr align='left'>
						<td colspan=3''><b>${requestScope.PageTitle}</b></td>
					</tr>
					<tr align='left'>
						<td>Employee Name:</td>
						<td>
							<input type="text" name="EmployeeName" value="${requestScope.LastEmployeeName}" />
						</td>
						<td>
							<div class="FieldErrorMsg">
								${requestScope.EmployeeNameErrorMsg}
							</div>
						</td>
					</tr>
					<tr align='left'>
						<td>Manager ID:</td>
						<td>
							<input type="text" name="ManagerID" value="${requestScope.LastManagerID}" />
						</td>
						<td>
							<div class="FieldErrorMsg">
								${requestScope.ManagerIDErrorMsg}
							</div>
						</td>
					</tr>
					<tr align='left'>
						<td>E-mail:</td>
						<td>
							<input type="text" name="Email" value="${requestScope.LastEmail}" />
						</td>
						<td>
							<div class="FieldErrorMsg">
								${requestScope.EmailErrorMsg}
							</div>
						</td>
					</tr>
					<tr align='left'>
						<td>Employee Rank:</td>
						<td>
							<select name='RankID'>
							<%
								Object tempO = request.getAttribute("LastRankID");
								if (tempO == null)
								{out.println("No Ranks Found!"); }
								else {
									Object[] inList = (Object[]) tempO;
									for (Object option : inList)
									{ out.println( option.toString() ); }
								}
							%>
							</select>
						</td>
						<td>
							<div class="FieldErrorMsg">
								${requestScope.RankIDErrorMsg}
							</div>
						</td>
					</tr>
					<tr align='left'>
						<td>Administrator rights:</td>
						<td>
							${requestScope.LastIsAdmin}
						</td>
						<td>
							<div class="FieldErrorMsg">
								${requestScope.IsAdminErrorMsg}
							</div>
						</td>
					</tr>
					<tr align='left'>
						<td>Send to Archive:</td>
						<td colspan='2'>
							${requestScope.LastDeleteFlag}
							<div class="FieldErrorMsg">
								${requestScope.DeleteFlagErrorMsg}
							</div>
						</td>
					</tr>	
					<tr align='left'>
						<td></td>
						<td>
							<button type="submit">Submit</button>
					</td>
					<td>
						<div style="width: 250px;">
							<!-- Hidden Field to differentiate first load from submission -->
							<input type="hidden" name="IsSubmit" value="true">
						</div>
					</td>
				</tr>
				<tr align='left'>
					<td></td>
					<td colspan='2'>${requestScope.ResetPassword}</td>
				</tr>
			</table>
		</form>
		</center>
	</body>
</html>